import request from '../utils/request.js'

export default {
    //查询所有类别
    SubmitAllClassification(){
        return request({
            method: 'get',
            url: '/videoservice/videoPlay/queryClassification',
        })
    },
    //获取用户发布数
    SubmitReleaseCount(uid){
        return request({
            method:'get',
            url:`/userservice/personalCenter/countPublish?uid=${uid}`
        })
    },
    //视频投稿
    SubmitFileUpload(data){
        return request({
            method: 'post',
            url: `/videoservice/videoPlay/addVideo`,
            data:data
        })
    },
    //根据用户id查询发布的视频
    SubmitByUserIdGetRelease(page,pageSize,video){
        return request({
            method: 'post',
            url: `/videoservice/videoPlay/queryPageVideo`,
            data:{
                page:page,
                pageSize:pageSize,
                queryInfo:video
            }
        })
    },
    //删除发布视频
    SubmitDeleteRelease(video){
        return request({
            method: 'delete',
            url: `/videoservice/videoPlay/deleteVideo`,
            data:video
        })
    },
    //根据id查询视频信息
    SubmitGetVideoById(id){
        return request({
            method: 'post',
            url: `/videoservice/videoPlay/queryPageVideo`,
            data:{
                page:1,
                pageSize:1,
                queryInfo:{
                    id:id
                }
            }
        })
    },
    //获取文件上传参数
    SubmitUpload(){
        return request({
            method: 'get',
            url: `/videoservice/videoPlay/upload`,
        })
    },
    //获取视频的其他信息
    SubmitcountByVid(vid){
        return request({
            method: 'get',
            url: `/videoservice/videoPlay/countByVid?vid=${vid}`,
        })
    }
}